def str_reverse(s):
    """
    字符串反转
    :param s: 输入的字符串
    :return: 反转后的字符串
    """
    return s[::-1]


def str_sub(s, x, y):
    """
    字符串切割
    :param s: 字符串
    :param x: 开始索引
    :param y: 结束索引
    :return: 切割后的字符串
    """
    return s[x: y]


if __name__ == '__main__':
    result = str_reverse("黑马程序员")
    print(result)





